<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="/shop/include :: header"></head>
<body>
	<form class="layui-form" action="" lay-filter="shop_merchants_goods_detail-update-form" style="margin-top: 20px;">
		<input th:value="${session.formToken}" name="formToken" type="hidden" />
		<input name="id" th:value="${shopMerchantsGoodsDetail.id}"
			type="hidden">
		<!--  -->
 		<!--  -->
		<div class="layui-form-item">
			<label class="layui-form-label">商品编码：</label>
			<div class="layui-input-block">
				<input class="layui-input" lay-verify="required" autocomplete="off" id="goodsCode"
					th:value="${shopMerchantsGoodsDetail.goodsCode}" name="goodsCode"
					placeholder="请输入商品编码">
			</div>
		</div>
 		<!--  -->
		<div class="layui-form-item">
			<label class="layui-form-label">标题：</label>
			<div class="layui-input-block">
				<input class="layui-input" lay-verify="required" autocomplete="off" id="title"
					th:value="${shopMerchantsGoodsDetail.title}" name="title"
					placeholder="请输入标题">
			</div>
		</div>
 		<!--  -->
		<div class="layui-form-item">
			<label class="layui-form-label">商品轮播图：</label>
			<div class="layui-input-block">
				<input class="layui-input" lay-verify="required" autocomplete="off" id="shufflingFigure"
					th:value="${shopMerchantsGoodsDetail.shufflingFigure}" name="shufflingFigure"
					placeholder="请输入商品轮播图">
			</div>
		</div>
 		<!--  -->
		<div class="layui-form-item">
			<label class="layui-form-label">售价：</label>
			<div class="layui-input-block">
				<input class="layui-input" lay-verify="required" autocomplete="off" id="price"
					th:value="${shopMerchantsGoodsDetail.price}" name="price"
					placeholder="请输入售价">
			</div>
		</div>
 		<!--  -->
		<div class="layui-form-item">
			<label class="layui-form-label">商品详情：</label>
			<div class="layui-input-block">
				<input class="layui-input" lay-verify="required" autocomplete="off" id="detail"
					th:value="${shopMerchantsGoodsDetail.detail}" name="detail"
					placeholder="请输入商品详情">
			</div>
		</div>
 		<!--  -->
		<div class="layui-form-item">
			<label class="layui-form-label">添加时间：</label>
			<div class="layui-input-block">
				<input class="layui-input" lay-verify="required" autocomplete="off" id="createTime"
					th:value="${#dates.format(shopMerchantsGoodsDetail.createTime, 'yyyy-MM-dd HH:mm:ss')}"
					name="createTime" placeholder="请输入添加时间">
			</div>
		</div>
 		<!--  -->
		<div class="layui-form-item">
			<label class="layui-form-label">修改时间：</label>
			<div class="layui-input-block">
				<input class="layui-input" lay-verify="required" autocomplete="off" id="updateTime"
					th:value="${#dates.format(shopMerchantsGoodsDetail.updateTime, 'yyyy-MM-dd HH:mm:ss')}"
					name="updateTime" placeholder="请输入修改时间">
			</div>
		</div>
 		<!--  -->
		<div class="layui-form-item">
			<label class="layui-form-label">删除状态 0：未删除1：已删除：</label>
			<div class="layui-input-block">
				<input class="layui-input" lay-verify="required" autocomplete="off" id="deleteFlag"
					th:value="${shopMerchantsGoodsDetail.deleteFlag}" name="deleteFlag"
					placeholder="请输入删除状态 0：未删除1：已删除">
			</div>
		</div>
 		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit="" lay-filter="shop_merchants_goods_detail-update">立即提交</button>
			</div>
		</div>
	</form>
	<div th:include="/shop/include::footer"></div>
	<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
	<script>
		layui.use([ 'layer', 'jquery', 'form', 'laydate' ], function() {
			var $ = layui.jquery;
			var laydate = layui.laydate;
			var layer = layui.layer;
			var form = layui.form;

			//日期时间选择器
      			laydate.render({
				elem : '#createTime',
				type : 'datetime'
			});
 			laydate.render({
				elem : '#updateTime',
				type : 'datetime'
			});
  
			//监听提交
			form.on('submit(shop_merchants_goods_detail-update)', function(data) {
				//提交数据data.field
				ajaxPostLoad("/shop/merchants_goods_detail/update", data.field);
				return false;
			});
		});
	</script>
</body>
</html>